//
// Created by A on 2024/6/22.
//
#ifndef GAME_CONFIG_H
#define GAME_CONFIG_H

#include "SDL.h"
#include "SDL_image.h"
#include "SDL_ttf.h"
#include "string"
#include "map.h"
#include "cJSON.h"
#include "Pinit.h"
#include "crash.h"
#define ResourcesPath   "../resources/"
#define FONTPath   "../resources/fonts/STSONG.TTF"
#define MapPath        "picture/tileset.png"
//#define leadPath        "picture/skeleton-walk.png"
//#define leadPath        "picture/CH0010B.png"
#define leadPath        "picture/204.png"
#define map_initfunsize 100
#define gFPS 60
#define StaticTime 0xFFFFFFFF


#define  ENABLE_FPS 1

#define  dif_speed 2
#define  dif_shift_speed 2

extern SDL_Window *window;  //窗口
extern SDL_Renderer *ren ;  //渲染器
extern TTF_Font * font; //字体
extern char fps_num[20];
extern SDL_Event event;//事件处理
extern uint64_t timeclock; //用于控制帧率
extern uint64_t time_begin;//用于帧率统计
extern uint64_t time_end;

extern int speed_X;
extern int speed_Y;

extern LNode* Spirit_Link; //精灵链表

//资源路径
extern std::string  Mapfile;
extern std::string  Leadfile;


extern SDL_Texture *Mapfiletex; //地图
extern Map_init map_fun[map_initfunsize];
extern uint8_t CrashMap[WIDTH+Map_Offset][HEIGHT+Map_Offset];
extern SDL_Rect grass;
extern SDL_Rect road;
extern SDL_Rect water;
extern SDL_Rect Lotus_leaf;
extern SDL_Rect grass_road;


#endif //GAME_CONFIG_H
